package com.aier.mapper.inventory;


import com.aier.bean.inventory.ProductEntryBean;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ProductEntryMapper extends BaseMapper<ProductEntryBean> {
    /**
     * 获取所有时间的出入库数据,并按时间排序
     * @return
     */
    List<ProductEntryBean> getAllData();

    /**
     * 根据型号，日期获取商品录入信息
     * @return
     */
    List<ProductEntryBean> getProductEntryByModelNameAndDate(@Param("modelName") String modelName, @Param("startDate") LocalDate startDate,@Param("endDate")  LocalDate endDate);

    /**
     * 修改业务员姓名
     */
    int updateSalespersonByModelNameAndOldSalesperson(@Param("modelName") String modelName, @Param("oldSalesperson") String oldSalesperson,@Param("newSalesperson") String newSalesperson);
}
